export class HealthReportResult {
    constructor(wordsResultNum, wordsResult) {
        this.wordsResultNum = wordsResultNum //识别结果数，表示words_result的元素个数
        this.wordsResult = wordsResult        //识别结果

        this.results = ''
        this.resultsHtml = ''

    }


    parseJson(res) {

        const data = JSON.parse(res.data.data)

        this.wordsResultNum = data.words_result_num
        this.wordsResult = data.words_result


        this.resultsHtml = this.wordsResult.map(item => `
    ${item.word_name}:   ${item.word}`).join('<br>')


        this.results = this.wordsResult.map(item => `
    ${item.word_name}:   ${item.word}`).join(' ')

        console.log(this.resultsHtml);

        console.log("results为：")
        console.log(this.results)


    }


}